(defun C:VREZ (/ entity ent start end)
  (setq entity (entnext))
  (while entity
    (setq ent (entget entity))
    (if (= (cdr (assoc 0 ent)) "CIRCLE")
      (progn
        (if (not (null (cdr (assoc 62 ent))))
          (setq ent (subst (cons '62 80) (assoc 62 ent) ent))
          (setq ent (append ent (list (cons '62 80))))
        )
        (entmod ent)
        (setq end (list (+ (cadr (assoc 10 ent)) (cdr (assoc 40 ent)))
                        (caddr (assoc 10 ent))
                        (cadddr (assoc 10 ent))
                  )
        )
        (setq start (list
                      (if (> (cdr (assoc 40 ent)) 5)
                        (- (car end) 5)
                        (cadr (assoc 10 ent))
                      )
                      (cadr end)
                      (caddr end)
                    )
        )
        (entmake (list (cons '0 "LINE")
                       (cons '62 3)
                       (cons '10 start)
                       (cons '11 end)
                 )
        )
      )
    )
    (setq entity (entnext entity))
  )
  (princ)
)
